package com.neulogistics.infrastructure.common.serviceresult;

/**
 * 错误码
 *
 * @author wlx
 */
public enum ErrorCode {

    /*
        private static final int SUCCESS_CODE = 200;
        private static final int ERROR_CODE = 500;
        private static final int OVERDUE_CODE = 401;
        private static final int TIMEOUT_CODE = 30000;
    */

    SUCCESS(200, "ok"),
    PARAMS_ERROR(500, "请求参数错误"),
    NOT_LOGIN_ERROR(401, "未登录"),
    AUTHENTICATION_ERROR(401,"认证失败"),
    INVALID_TOKEN_ERROR(401, "非法的token"),
    NO_AUTH_ERROR(401, "无权限"),
    NOT_FOUND_ERROR(401, "请求数据不存在"),
    FORBIDDEN_ERROR(401, "禁止访问"),
    SYSTEM_ERROR(500, "系统内部异常"),
    OPERATION_ERROR(500, "操作失败");



    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
